package com.sky.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.sky.common.EnumDeserializer;
import com.sky.common.EnumSerializer;
import com.sky.enumeration.CategoryStatusEnum;
import com.sky.enumeration.CategoryTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CategoryEntity implements Serializable {
    @ApiModelProperty("主键")
    private Long id;

    @JSONField(serializeUsing = EnumSerializer.class, deserializeUsing = EnumDeserializer.class)
    @ApiModelProperty("1菜品2套餐")
    private CategoryTypeEnum type;

    @ApiModelProperty("分类名称唯一值")
    private String name;

    @ApiModelProperty("排序字段")
    private Integer sort;

    @JSONField(serializeUsing = EnumSerializer.class, deserializeUsing = EnumDeserializer.class)
    @ApiModelProperty("1启用0禁用")
    private CategoryStatusEnum status;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;

    private Long createUser;

    private Long updateUser;
}
